Integrand size = 36, antiderivative size = 306 \[ \int \frac {\tan ^{\frac {5}{2}}(c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=-\frac {\left (\frac {1}{4}+\frac {i}{4}\right ) ((4+i) A+(1+6 i) B) \arctan \left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2} a d}+\frac {\left (\frac {1}{4}+\frac {i}{4}\right ) ((4+i) A+(1+6 i) B) \arctan \left (1+\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2} a d}-\frac {\left (\frac {1}{8}+\frac {i}{8}\right ) ((1+4 i) A-(6+i) B) \log \left (1-\sqrt {2} \sqrt {\tan (c+d x)}+\tan (c+d x)\right )}{\sqrt {2} a d}-\frac {((3-5 i) A+(5+7 i) B) \log \left (1+\sqrt {2} \sqrt {\tan (c+d x)}+\tan (c+d x)\right )}{8 \sqrt {2} a d}-\frac {5 (i A-B) \sqrt {\tan (c+d x)}}{2 a d}-\frac {(3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{6 a d}+\frac {(i A-B) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))} \]
(1/8+1/8*I)*((4+I)*A+(1+6*I)*B)*arctan(-1+2^(1/2)*tan(d*x+c)^(1/2))/a/d*2^ (1/2)+(1/8+1/8*I)*((4+I)*A+(1+6*I)*B)*arctan(1+2^(1/2)*tan(d*x+c)^(1/2))/a /d*2^(1/2)-(1/16+1/16*I)*((1+4*I)*A-(6+I)*B)*ln(1-2^(1/2)*tan(d*x+c)^(1/2) +tan(d*x+c))/a/d*2^(1/2)-1/16*((3-5*I)*A+(5+7*I)*B)*ln(1+2^(1/2)*tan(d*x+c )^(1/2)+tan(d*x+c))/a/d*2^(1/2)-5/2*(I*A-B)*tan(d*x+c)^(1/2)/a/d-1/6*(3*A+ 7*I*B)*tan(d*x+c)^(3/2)/a/d+1/2*(I*A-B)*tan(d*x+c)^(5/2)/d/(a+I*a*tan(d*x+ c))
Time = 2.47 (sec) , antiderivative size = 138, normalized size of antiderivative = 0.45 \[ \int \frac {\tan ^{\frac {5}{2}}(c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=\frac {-3 (-1)^{3/4} (A-i B) \arctan \left ((-1)^{3/4} \sqrt {\tan (c+d x)}\right )-6 (-1)^{3/4} (2 A+3 i B) \text {arctanh}\left ((-1)^{3/4} \sqrt {\tan (c+d x)}\right )+\frac {\sqrt {\tan (c+d x)} \left (-15 (A+i B)+4 (-3 i A+2 B) \tan (c+d x)-4 i B \tan ^2(c+d x)\right )}{-i+\tan (c+d x)}}{6 a d} \]
(-3*(-1)^(3/4)*(A - I*B)*ArcTan[(-1)^(3/4)*Sqrt[Tan[c + d*x]]] - 6*(-1)^(3 /4)*(2*A + (3*I)*B)*ArcTanh[(-1)^(3/4)*Sqrt[Tan[c + d*x]]] + (Sqrt[Tan[c + d*x]]*(-15*(A + I*B) + 4*((-3*I)*A + 2*B)*Tan[c + d*x] - (4*I)*B*Tan[c + d*x]^2))/(-I + Tan[c + d*x]))/(6*a*d)
Time = 0.92 (sec) , antiderivative size = 270, normalized size of antiderivative = 0.88, number of steps used = 20, number of rules used = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.528, Rules used = {3042, 4078, 27, 3042, 4011, 3042, 4011, 3042, 4017, 25, 27, 1482, 1476, 1082, 217, 1479, 25, 27, 1103}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan ^{\frac {5}{2}}(c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (c+d x)^{5/2} (A+B \tan (c+d x))}{a+i a \tan (c+d x)}dx\) |
\(\Big \downarrow \) 4078 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {\int \frac {1}{2} \tan ^{\frac {3}{2}}(c+d x) (5 a (i A-B)+a (3 A+7 i B) \tan (c+d x))dx}{2 a^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {\int \tan ^{\frac {3}{2}}(c+d x) (5 a (i A-B)+a (3 A+7 i B) \tan (c+d x))dx}{4 a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {\int \tan (c+d x)^{3/2} (5 a (i A-B)+a (3 A+7 i B) \tan (c+d x))dx}{4 a^2}\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {\int \sqrt {\tan (c+d x)} (5 a (i A-B) \tan (c+d x)-a (3 A+7 i B))dx+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}}{4 a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {\int \sqrt {\tan (c+d x)} (5 a (i A-B) \tan (c+d x)-a (3 A+7 i B))dx+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}}{4 a^2}\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {\int \frac {-5 a (i A-B)-a (3 A+7 i B) \tan (c+d x)}{\sqrt {\tan (c+d x)}}dx+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {10 a (-B+i A) \sqrt {\tan (c+d x)}}{d}}{4 a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {\int \frac {-5 a (i A-B)-a (3 A+7 i B) \tan (c+d x)}{\sqrt {\tan (c+d x)}}dx+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {10 a (-B+i A) \sqrt {\tan (c+d x)}}{d}}{4 a^2}\) |
\(\Big \downarrow \) 4017 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {\frac {2 \int -\frac {a (5 (i A-B)+(3 A+7 i B) \tan (c+d x))}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}}{d}+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {10 a (-B+i A) \sqrt {\tan (c+d x)}}{d}}{4 a^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {-\frac {2 \int \frac {a (5 (i A-B)+(3 A+7 i B) \tan (c+d x))}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}}{d}+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {10 a (-B+i A) \sqrt {\tan (c+d x)}}{d}}{4 a^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {-\frac {2 a \int \frac {5 (i A-B)+(3 A+7 i B) \tan (c+d x)}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}}{d}+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {10 a (-B+i A) \sqrt {\tan (c+d x)}}{d}}{4 a^2}\) |
\(\Big \downarrow \) 1482 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {-\frac {2 a \left (\left (\frac {1}{2}+\frac {i}{2}\right ) ((1+4 i) A-(6+i) B) \int \frac {1-\tan (c+d x)}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}+\left (\frac {1}{2}+\frac {i}{2}\right ) ((4+i) A+(1+6 i) B) \int \frac {\tan (c+d x)+1}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}\right )}{d}+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {10 a (-B+i A) \sqrt {\tan (c+d x)}}{d}}{4 a^2}\) |
\(\Big \downarrow \) 1476 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {-\frac {2 a \left (\left (\frac {1}{2}+\frac {i}{2}\right ) ((1+4 i) A-(6+i) B) \int \frac {1-\tan (c+d x)}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}+\left (\frac {1}{2}+\frac {i}{2}\right ) ((4+i) A+(1+6 i) B) \left (\frac {1}{2} \int \frac {1}{\tan (c+d x)-\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}+\frac {1}{2} \int \frac {1}{\tan (c+d x)+\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}\right )\right )}{d}+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {10 a (-B+i A) \sqrt {\tan (c+d x)}}{d}}{4 a^2}\) |
\(\Big \downarrow \) 1082 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {-\frac {2 a \left (\left (\frac {1}{2}+\frac {i}{2}\right ) ((1+4 i) A-(6+i) B) \int \frac {1-\tan (c+d x)}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}+\left (\frac {1}{2}+\frac {i}{2}\right ) ((4+i) A+(1+6 i) B) \left (\frac {\int \frac {1}{-\tan (c+d x)-1}d\left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2}}-\frac {\int \frac {1}{-\tan (c+d x)-1}d\left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\sqrt {2}}\right )\right )}{d}+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {10 a (-B+i A) \sqrt {\tan (c+d x)}}{d}}{4 a^2}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {-\frac {2 a \left (\left (\frac {1}{2}+\frac {i}{2}\right ) ((1+4 i) A-(6+i) B) \int \frac {1-\tan (c+d x)}{\tan ^2(c+d x)+1}d\sqrt {\tan (c+d x)}+\left (\frac {1}{2}+\frac {i}{2}\right ) ((4+i) A+(1+6 i) B) \left (\frac {\arctan \left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2}}\right )\right )}{d}+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {10 a (-B+i A) \sqrt {\tan (c+d x)}}{d}}{4 a^2}\) |
\(\Big \downarrow \) 1479 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {-\frac {2 a \left (\left (\frac {1}{2}+\frac {i}{2}\right ) ((1+4 i) A-(6+i) B) \left (-\frac {\int -\frac {\sqrt {2}-2 \sqrt {\tan (c+d x)}}{\tan (c+d x)-\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}}{2 \sqrt {2}}-\frac {\int -\frac {\sqrt {2} \left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\tan (c+d x)+\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}}{2 \sqrt {2}}\right )+\left (\frac {1}{2}+\frac {i}{2}\right ) ((4+i) A+(1+6 i) B) \left (\frac {\arctan \left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2}}\right )\right )}{d}+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {10 a (-B+i A) \sqrt {\tan (c+d x)}}{d}}{4 a^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {-\frac {2 a \left (\left (\frac {1}{2}+\frac {i}{2}\right ) ((1+4 i) A-(6+i) B) \left (\frac {\int \frac {\sqrt {2}-2 \sqrt {\tan (c+d x)}}{\tan (c+d x)-\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}}{2 \sqrt {2}}+\frac {\int \frac {\sqrt {2} \left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\tan (c+d x)+\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}}{2 \sqrt {2}}\right )+\left (\frac {1}{2}+\frac {i}{2}\right ) ((4+i) A+(1+6 i) B) \left (\frac {\arctan \left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2}}\right )\right )}{d}+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {10 a (-B+i A) \sqrt {\tan (c+d x)}}{d}}{4 a^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {-\frac {2 a \left (\left (\frac {1}{2}+\frac {i}{2}\right ) ((1+4 i) A-(6+i) B) \left (\frac {\int \frac {\sqrt {2}-2 \sqrt {\tan (c+d x)}}{\tan (c+d x)-\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}}{2 \sqrt {2}}+\frac {1}{2} \int \frac {\sqrt {2} \sqrt {\tan (c+d x)}+1}{\tan (c+d x)+\sqrt {2} \sqrt {\tan (c+d x)}+1}d\sqrt {\tan (c+d x)}\right )+\left (\frac {1}{2}+\frac {i}{2}\right ) ((4+i) A+(1+6 i) B) \left (\frac {\arctan \left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2}}\right )\right )}{d}+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {10 a (-B+i A) \sqrt {\tan (c+d x)}}{d}}{4 a^2}\) |
\(\Big \downarrow \) 1103 |
\(\displaystyle \frac {(-B+i A) \tan ^{\frac {5}{2}}(c+d x)}{2 d (a+i a \tan (c+d x))}-\frac {-\frac {2 a \left (\left (\frac {1}{2}+\frac {i}{2}\right ) ((4+i) A+(1+6 i) B) \left (\frac {\arctan \left (\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{\sqrt {2}}-\frac {\arctan \left (1-\sqrt {2} \sqrt {\tan (c+d x)}\right )}{\sqrt {2}}\right )+\left (\frac {1}{2}+\frac {i}{2}\right ) ((1+4 i) A-(6+i) B) \left (\frac {\log \left (\tan (c+d x)+\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{2 \sqrt {2}}-\frac {\log \left (\tan (c+d x)-\sqrt {2} \sqrt {\tan (c+d x)}+1\right )}{2 \sqrt {2}}\right )\right )}{d}+\frac {2 a (3 A+7 i B) \tan ^{\frac {3}{2}}(c+d x)}{3 d}+\frac {10 a (-B+i A) \sqrt {\tan (c+d x)}}{d}}{4 a^2}\) |
((I*A - B)*Tan[c + d*x]^(5/2))/(2*d*(a + I*a*Tan[c + d*x])) - ((-2*a*((1/2 + I/2)*((4 + I)*A + (1 + 6*I)*B)*(-(ArcTan[1 - Sqrt[2]*Sqrt[Tan[c + d*x]] ]/Sqrt[2]) + ArcTan[1 + Sqrt[2]*Sqrt[Tan[c + d*x]]]/Sqrt[2]) + (1/2 + I/2) *((1 + 4*I)*A - (6 + I)*B)*(-1/2*Log[1 - Sqrt[2]*Sqrt[Tan[c + d*x]] + Tan[ c + d*x]]/Sqrt[2] + Log[1 + Sqrt[2]*Sqrt[Tan[c + d*x]] + Tan[c + d*x]]/(2* Sqrt[2]))))/d + (10*a*(I*A - B)*Sqrt[Tan[c + d*x]])/d + (2*a*(3*A + (7*I)* B)*Tan[c + d*x]^(3/2))/(3*d))/(4*a^2)
3.2.34.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*S implify[a*(c/b^2)]}, Simp[-2/b Subst[Int[1/(q - x^2), x], x, 1 + 2*c*(x/b )], x] /; RationalQ[q] && (EqQ[q^2, 1] || !RationalQ[b^2 - 4*a*c])] /; Fre eQ[{a, b, c}, x]
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> S imp[d*(Log[RemoveContent[a + b*x + c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]
Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[ 2*(d/e), 2]}, Simp[e/(2*c) Int[1/Simp[d/e + q*x + x^2, x], x], x] + Simp[ e/(2*c) Int[1/Simp[d/e - q*x + x^2, x], x], x]] /; FreeQ[{a, c, d, e}, x] && EqQ[c*d^2 - a*e^2, 0] && PosQ[d*e]
Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[ -2*(d/e), 2]}, Simp[e/(2*c*q) Int[(q - 2*x)/Simp[d/e + q*x - x^2, x], x], x] + Simp[e/(2*c*q) Int[(q + 2*x)/Simp[d/e - q*x - x^2, x], x], x]] /; F reeQ[{a, c, d, e}, x] && EqQ[c*d^2 - a*e^2, 0] && NegQ[d*e]
Int[((d_) + (e_.)*(x_)^2)/((a_) + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[ a*c, 2]}, Simp[(d*q + a*e)/(2*a*c) Int[(q + c*x^2)/(a + c*x^4), x], x] + Simp[(d*q - a*e)/(2*a*c) Int[(q - c*x^2)/(a + c*x^4), x], x]] /; FreeQ[{a , c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && NeQ[c*d^2 - a*e^2, 0] && NegQ[(- a)*c]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[d*((a + b*Tan[e + f*x])^m/(f*m)), x] + Int [(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x], x] , x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]
Int[((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])/Sqrt[(b_.)*tan[(e_.) + (f_.)*(x_ )]], x_Symbol] :> Simp[2/f Subst[Int[(b*c + d*x^2)/(b^2 + x^4), x], x, Sq rt[b*Tan[e + f*x]]], x] /; FreeQ[{b, c, d, e, f}, x] && NeQ[c^2 - d^2, 0] & & NeQ[c^2 + d^2, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(-(A*b - a*B))*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^n/(2*a*f*m)), x] + Simp[1/(2*a^2*m) Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f* x])^(n - 1)*Simp[A*(a*c*m + b*d*n) - B*(b*c*m + a*d*n) - d*(b*B*(m - n) - a *A*(m + n))*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] && GtQ[n, 0]
Time = 0.08 (sec) , antiderivative size = 166, normalized size of antiderivative = 0.54
method | result | size |
derivativedivides | \(\frac {-\frac {2 i B \left (\tan ^{\frac {3}{2}}\left (d x +c \right )\right )}{3}+2 B \left (\sqrt {\tan }\left (d x +c \right )\right )-2 i A \left (\sqrt {\tan }\left (d x +c \right )\right )-\frac {i \left (-\frac {i \left (i B +A \right ) \left (\sqrt {\tan }\left (d x +c \right )\right )}{\tan \left (d x +c \right )-i}+\frac {4 \left (2 i A -3 B \right ) \arctan \left (\frac {2 \left (\sqrt {\tan }\left (d x +c \right )\right )}{\sqrt {2}-i \sqrt {2}}\right )}{\sqrt {2}-i \sqrt {2}}\right )}{2}+\frac {4 \left (-\frac {A}{4}+\frac {i B}{4}\right ) \arctan \left (\frac {2 \left (\sqrt {\tan }\left (d x +c \right )\right )}{\sqrt {2}+i \sqrt {2}}\right )}{\sqrt {2}+i \sqrt {2}}}{d a}\) | \(166\) |
default | \(\frac {-\frac {2 i B \left (\tan ^{\frac {3}{2}}\left (d x +c \right )\right )}{3}+2 B \left (\sqrt {\tan }\left (d x +c \right )\right )-2 i A \left (\sqrt {\tan }\left (d x +c \right )\right )-\frac {i \left (-\frac {i \left (i B +A \right ) \left (\sqrt {\tan }\left (d x +c \right )\right )}{\tan \left (d x +c \right )-i}+\frac {4 \left (2 i A -3 B \right ) \arctan \left (\frac {2 \left (\sqrt {\tan }\left (d x +c \right )\right )}{\sqrt {2}-i \sqrt {2}}\right )}{\sqrt {2}-i \sqrt {2}}\right )}{2}+\frac {4 \left (-\frac {A}{4}+\frac {i B}{4}\right ) \arctan \left (\frac {2 \left (\sqrt {\tan }\left (d x +c \right )\right )}{\sqrt {2}+i \sqrt {2}}\right )}{\sqrt {2}+i \sqrt {2}}}{d a}\) | \(166\) |
1/d/a*(-2/3*I*B*tan(d*x+c)^(3/2)+2*B*tan(d*x+c)^(1/2)-2*I*A*tan(d*x+c)^(1/ 2)-1/2*I*(-I*(A+I*B)*tan(d*x+c)^(1/2)/(tan(d*x+c)-I)+4*(2*I*A-3*B)/(2^(1/2 )-I*2^(1/2))*arctan(2*tan(d*x+c)^(1/2)/(2^(1/2)-I*2^(1/2))))+4*(-1/4*A+1/4 *I*B)/(2^(1/2)+I*2^(1/2))*arctan(2*tan(d*x+c)^(1/2)/(2^(1/2)+I*2^(1/2))))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 707 vs. \(2 (221) = 442\).
Time = 0.28 (sec) , antiderivative size = 707, normalized size of antiderivative = 2.31 \[ \int \frac {\tan ^{\frac {5}{2}}(c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=\frac {3 \, {\left (a d e^{\left (4 i \, d x + 4 i \, c\right )} + a d e^{\left (2 i \, d x + 2 i \, c\right )}\right )} \sqrt {\frac {i \, A^{2} + 2 \, A B - i \, B^{2}}{a^{2} d^{2}}} \log \left (\frac {2 \, {\left ({\left (a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d\right )} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, A^{2} + 2 \, A B - i \, B^{2}}{a^{2} d^{2}}} + {\left (A - i \, B\right )} e^{\left (2 i \, d x + 2 i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{i \, A + B}\right ) - 3 \, {\left (a d e^{\left (4 i \, d x + 4 i \, c\right )} + a d e^{\left (2 i \, d x + 2 i \, c\right )}\right )} \sqrt {\frac {i \, A^{2} + 2 \, A B - i \, B^{2}}{a^{2} d^{2}}} \log \left (-\frac {2 \, {\left ({\left (a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d\right )} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {i \, A^{2} + 2 \, A B - i \, B^{2}}{a^{2} d^{2}}} - {\left (A - i \, B\right )} e^{\left (2 i \, d x + 2 i \, c\right )}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{i \, A + B}\right ) - 6 \, {\left (a d e^{\left (4 i \, d x + 4 i \, c\right )} + a d e^{\left (2 i \, d x + 2 i \, c\right )}\right )} \sqrt {\frac {-4 i \, A^{2} + 12 \, A B + 9 i \, B^{2}}{a^{2} d^{2}}} \log \left (-\frac {{\left ({\left (a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d\right )} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-4 i \, A^{2} + 12 \, A B + 9 i \, B^{2}}{a^{2} d^{2}}} + 2 \, A + 3 i \, B\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{a d}\right ) + 6 \, {\left (a d e^{\left (4 i \, d x + 4 i \, c\right )} + a d e^{\left (2 i \, d x + 2 i \, c\right )}\right )} \sqrt {\frac {-4 i \, A^{2} + 12 \, A B + 9 i \, B^{2}}{a^{2} d^{2}}} \log \left (\frac {{\left ({\left (a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d\right )} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-4 i \, A^{2} + 12 \, A B + 9 i \, B^{2}}{a^{2} d^{2}}} - 2 \, A - 3 i \, B\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{a d}\right ) + 2 \, {\left ({\left (-27 i \, A + 19 \, B\right )} e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, {\left (15 i \, A - 19 \, B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} - 3 i \, A + 3 \, B\right )} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}}{24 \, {\left (a d e^{\left (4 i \, d x + 4 i \, c\right )} + a d e^{\left (2 i \, d x + 2 i \, c\right )}\right )}} \]
1/24*(3*(a*d*e^(4*I*d*x + 4*I*c) + a*d*e^(2*I*d*x + 2*I*c))*sqrt((I*A^2 + 2*A*B - I*B^2)/(a^2*d^2))*log(2*((a*d*e^(2*I*d*x + 2*I*c) + a*d)*sqrt((-I* e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((I*A^2 + 2*A*B - I*B^2)/(a^2*d^2)) + (A - I*B)*e^(2*I*d*x + 2*I*c))*e^(-2*I*d*x - 2*I*c)/(I *A + B)) - 3*(a*d*e^(4*I*d*x + 4*I*c) + a*d*e^(2*I*d*x + 2*I*c))*sqrt((I*A ^2 + 2*A*B - I*B^2)/(a^2*d^2))*log(-2*((a*d*e^(2*I*d*x + 2*I*c) + a*d)*sqr t((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((I*A^2 + 2* A*B - I*B^2)/(a^2*d^2)) - (A - I*B)*e^(2*I*d*x + 2*I*c))*e^(-2*I*d*x - 2*I *c)/(I*A + B)) - 6*(a*d*e^(4*I*d*x + 4*I*c) + a*d*e^(2*I*d*x + 2*I*c))*sqr t((-4*I*A^2 + 12*A*B + 9*I*B^2)/(a^2*d^2))*log(-((a*d*e^(2*I*d*x + 2*I*c) + a*d)*sqrt((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1))*sqrt(( -4*I*A^2 + 12*A*B + 9*I*B^2)/(a^2*d^2)) + 2*A + 3*I*B)*e^(-2*I*d*x - 2*I*c )/(a*d)) + 6*(a*d*e^(4*I*d*x + 4*I*c) + a*d*e^(2*I*d*x + 2*I*c))*sqrt((-4* I*A^2 + 12*A*B + 9*I*B^2)/(a^2*d^2))*log(((a*d*e^(2*I*d*x + 2*I*c) + a*d)* sqrt((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((-4*I*A^ 2 + 12*A*B + 9*I*B^2)/(a^2*d^2)) - 2*A - 3*I*B)*e^(-2*I*d*x - 2*I*c)/(a*d) ) + 2*((-27*I*A + 19*B)*e^(4*I*d*x + 4*I*c) - 2*(15*I*A - 19*B)*e^(2*I*d*x + 2*I*c) - 3*I*A + 3*B)*sqrt((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2 *I*c) + 1)))/(a*d*e^(4*I*d*x + 4*I*c) + a*d*e^(2*I*d*x + 2*I*c))
\[ \int \frac {\tan ^{\frac {5}{2}}(c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=- \frac {i \left (\int \frac {A \tan ^{\frac {5}{2}}{\left (c + d x \right )}}{\tan {\left (c + d x \right )} - i}\, dx + \int \frac {B \tan ^{\frac {7}{2}}{\left (c + d x \right )}}{\tan {\left (c + d x \right )} - i}\, dx\right )}{a} \]
-I*(Integral(A*tan(c + d*x)**(5/2)/(tan(c + d*x) - I), x) + Integral(B*tan (c + d*x)**(7/2)/(tan(c + d*x) - I), x))/a
Exception generated. \[ \int \frac {\tan ^{\frac {5}{2}}(c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=\text {Exception raised: RuntimeError} \]
Time = 0.53 (sec) , antiderivative size = 163, normalized size of antiderivative = 0.53 \[ \int \frac {\tan ^{\frac {5}{2}}(c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=\frac {\left (i + 1\right ) \, \sqrt {2} {\left (2 \, A + 3 i \, B\right )} \arctan \left (\left (\frac {1}{2} i + \frac {1}{2}\right ) \, \sqrt {2} \sqrt {\tan \left (d x + c\right )}\right )}{2 \, a d} + \frac {\left (i - 1\right ) \, \sqrt {2} {\left (A - i \, B\right )} \arctan \left (-\left (\frac {1}{2} i - \frac {1}{2}\right ) \, \sqrt {2} \sqrt {\tan \left (d x + c\right )}\right )}{4 \, a d} - \frac {A \sqrt {\tan \left (d x + c\right )} + i \, B \sqrt {\tan \left (d x + c\right )}}{2 \, a d {\left (\tan \left (d x + c\right ) - i\right )}} - \frac {2 \, {\left (i \, B a^{2} d^{2} \tan \left (d x + c\right )^{\frac {3}{2}} + 3 i \, A a^{2} d^{2} \sqrt {\tan \left (d x + c\right )} - 3 \, B a^{2} d^{2} \sqrt {\tan \left (d x + c\right )}\right )}}{3 \, a^{3} d^{3}} \]
(1/2*I + 1/2)*sqrt(2)*(2*A + 3*I*B)*arctan((1/2*I + 1/2)*sqrt(2)*sqrt(tan( d*x + c)))/(a*d) + (1/4*I - 1/4)*sqrt(2)*(A - I*B)*arctan(-(1/2*I - 1/2)*s qrt(2)*sqrt(tan(d*x + c)))/(a*d) - 1/2*(A*sqrt(tan(d*x + c)) + I*B*sqrt(ta n(d*x + c)))/(a*d*(tan(d*x + c) - I)) - 2/3*(I*B*a^2*d^2*tan(d*x + c)^(3/2 ) + 3*I*A*a^2*d^2*sqrt(tan(d*x + c)) - 3*B*a^2*d^2*sqrt(tan(d*x + c)))/(a^ 3*d^3)
Time = 13.77 (sec) , antiderivative size = 305, normalized size of antiderivative = 1.00 \[ \int \frac {\tan ^{\frac {5}{2}}(c+d x) (A+B \tan (c+d x))}{a+i a \tan (c+d x)} \, dx=\mathrm {atan}\left (\frac {a\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {-\frac {A^2\,1{}\mathrm {i}}{a^2\,d^2}}\,1{}\mathrm {i}}{A}\right )\,\sqrt {-\frac {A^2\,1{}\mathrm {i}}{a^2\,d^2}}\,2{}\mathrm {i}-\mathrm {atan}\left (\frac {a\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {A^2\,1{}\mathrm {i}}{16\,a^2\,d^2}}\,4{}\mathrm {i}}{A}\right )\,\sqrt {\frac {A^2\,1{}\mathrm {i}}{16\,a^2\,d^2}}\,2{}\mathrm {i}+\mathrm {atan}\left (\frac {2\,a\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {\frac {B^2\,9{}\mathrm {i}}{4\,a^2\,d^2}}}{3\,B}\right )\,\sqrt {\frac {B^2\,9{}\mathrm {i}}{4\,a^2\,d^2}}\,2{}\mathrm {i}+\mathrm {atan}\left (\frac {4\,a\,d\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,\sqrt {-\frac {B^2\,1{}\mathrm {i}}{16\,a^2\,d^2}}}{B}\right )\,\sqrt {-\frac {B^2\,1{}\mathrm {i}}{16\,a^2\,d^2}}\,2{}\mathrm {i}-\frac {A\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,2{}\mathrm {i}}{a\,d}+\frac {2\,B\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}}{a\,d}-\frac {B\,{\mathrm {tan}\left (c+d\,x\right )}^{3/2}\,2{}\mathrm {i}}{3\,a\,d}-\frac {A\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}\,1{}\mathrm {i}}{2\,a\,d\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}+\frac {B\,\sqrt {\mathrm {tan}\left (c+d\,x\right )}}{2\,a\,d\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )} \]
atan((a*d*tan(c + d*x)^(1/2)*(-(A^2*1i)/(a^2*d^2))^(1/2)*1i)/A)*(-(A^2*1i) /(a^2*d^2))^(1/2)*2i - atan((a*d*tan(c + d*x)^(1/2)*((A^2*1i)/(16*a^2*d^2) )^(1/2)*4i)/A)*((A^2*1i)/(16*a^2*d^2))^(1/2)*2i + atan((2*a*d*tan(c + d*x) ^(1/2)*((B^2*9i)/(4*a^2*d^2))^(1/2))/(3*B))*((B^2*9i)/(4*a^2*d^2))^(1/2)*2 i + atan((4*a*d*tan(c + d*x)^(1/2)*(-(B^2*1i)/(16*a^2*d^2))^(1/2))/B)*(-(B ^2*1i)/(16*a^2*d^2))^(1/2)*2i - (A*tan(c + d*x)^(1/2)*2i)/(a*d) + (2*B*tan (c + d*x)^(1/2))/(a*d) - (B*tan(c + d*x)^(3/2)*2i)/(3*a*d) - (A*tan(c + d* x)^(1/2)*1i)/(2*a*d*(tan(c + d*x)*1i + 1)) + (B*tan(c + d*x)^(1/2))/(2*a*d *(tan(c + d*x)*1i + 1))